|
In mathematics, computer science and especially graph theory, a distance matrix is a matrix (two-dimensional array) containing the distances, taken pairwise, between the elements of a set. Depending upon the application involved, the ''distance'' being used to define this matrix may or may not be a metric. If there are elements, this matrix will have size . In graph-theoretic applications the elements are more often referred to as points, nodes or vertices. ==Metric distance== When distance is defined as a metric, as for example in the Euclidean distance matrix, the distance matrix satisfies properties directly related to the defining properties of a metric. That is, if with is a distance matrix for a metric distance, then * the entries on the main diagonal are all zero (that is, the matrix is a hollow matrix), i.e. for all , * all the off-diagonal entries are positive ( if ), * the matrix is a symmetric matrix (), and * for any and , for all (the triangle inequality). Another common example of a distance matrix arises in coding theory when in a block code the elements are strings of fixed length over an alphabet and the distance between them is given by the Hamming distance metric. The smallest non-zero entry in the distance matrix measures the error correcting and error detecting capability of the code. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Distance matrix」の詳細全文を読む スポンサード リンク
|